<?php
echo '<pre>';
print_r(getimagesize('li.jpg'));
echo round(filesize('li.jpg')/1024/1024,2).'MB';
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>webrx</title>
</head>
<body>
<img src="li.jpg" width="200" alt="">
</body>
</html>
